package com.itheima.xiancheng.homework.homework3;

public class SellTicket implements Runnable {
    private int ticktNum = 0;

    @Override
    public void run() {
        synchronized ("abc") {
            while (ticktNum <100 && ticktNum >= 0) {
                ticktNum++;
                System.out.println(Thread.currentThread().getName() + "正在卖第" + ticktNum + "票");
            }
        }
    }
}
